#pragma once

#include "PhysicsPrimitives.h"
#include "WorldData.h"
#include "Light.h"

namespace mgfx
{
	struct EditorRenderData;
}

namespace mscene
{
	class Node;
	class ModelNode;

	struct PrimitiveNodeDesc
	{
		PrimitiveNodeDesc();
		XMFLOAT3 Position;
		XMFLOAT4 Orientation;
		XMFLOAT3 Scale;
		bool IsStatic;
		XMFLOAT4 Color;
	};

	ModelNode * createBoxNode(const PrimitiveNodeDesc & desc, const WorldData & world);
	ModelNode * createSphereNode(const PrimitiveNodeDesc & desc, const WorldData & world);
	ModelNode * createPlaneNode(const PrimitiveNodeDesc & desc, const WorldData & world);
	Node * createPointLightNode(const PrimitiveNodeDesc & desc, const mgfx::PointLightDesc & lightDesc, const WorldData & world);
	Node * createSpotLightNode(const PrimitiveNodeDesc & desc, const mgfx::SpotLightDesc & lightDesc, const WorldData & world);

	void fillEditorRenderDataFromNodes(const std::vector<Node*> & nodes, mgfx::EditorRenderData & outData);
}